package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingPlan;
import com.zzyl.vo.NursingPlanVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingPlanMapper {
    /**
     * 分页查询
     * @param name
     * @param status
     * @return
     */

    Page<NursingPlanVo> pageQuer(@Param("name") String name,@Param("status")  Integer status);

    /**
     * 根据id删除护理计划
     * @param id
     */
    void deleteById(Long id);

    /**
     * 启用/禁用护理计划
     * @param id
     * @param status
     */
    void updateStatusById(Long id, Integer status);


//    @Select("SELECT np.* ,np.plan_name planName FROM nursing_plan np where status = 1")

//@Select("select * from nursing_plan where id =#{id} ")
    NursingPlanVo findId(Long id);

    /**
     * 新增护理计划
     * @param nursingPlan
     */
    void insert(NursingPlan nursingPlan);

    /**
     * 修改
     * @param nursingPlan
     */
    void update(NursingPlan nursingPlan);

    List<NursingPlan> getAll();
}
